
package format.dou;

import java.text.DecimalFormat;

/**
 * 測試 double 的值, 經過 DecimalFormat, 
 * <br>
 * Copyright: Copyright (c) 2001-2007<br>
 * Company: 一零四資訊科技股份有限公司
 * 
 * @author Eric.Kao(eric.kao@104.com.tw)
 * @version 1.0
 */
public class TestFormatDouble
{
	public TestFormatDouble()
	{
		double value = 111111111111111.20;

		DecimalFormat format = new DecimalFormat();

		format.applyPattern( "#.##" );

		String str = format.format( value );

		System.out.println( "Value is format    :" + str );
		System.out.println( "Value is not format:" + value );
	}

	public static void main( String[] args )
	{
		new TestFormatDouble();
	}
}
